<?php
include('./config.php');

$id = $_GET['id'];
$money = $_GET['money'];

$sql = "update bank set money=money-$money where Id=$id";

$res = mysql_query($sql);
// $res是布尔值，因为更新语句只需要直到更新操作成功与否即可

if ($res) {
  // 取钱成功
  echo "<meta charset='utf-8'>";
  echo '取钱成功';
} else {
  echo "<meta charset='utf-8'>";
  echo '取钱失败';
}


?>